<!DOCTYPE html>
<html>
<head>
    <title>评价详情</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=1366, maximum-scale=1.0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="./data/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="./data/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="./data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="./data/styles1.css" type="text/css" rel="stylesheet"/>
    <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" type="text/css" rel="stylesheet"/>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="./data/scripts/jquery-1.7.1.min.js"></script>
    <script src="./data/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="./data/scripts/prototypePre.js"></script>
    <script src="./data/document.js"></script>
    <script src="./data/prototypePost.js"></script>
    <script src="./data/data.js"></script>


    <script type="text/javascript">
        $axure.utils.getTransparentGifPath = function() { return 'resources/images/transparent.gif'; };
        $axure.utils.getOtherPath = function() { return 'resources/Other.html'; };
        $axure.utils.getReloadPath = function() { return 'resources/reload.html'; };
    </script>
</head>
<body>
<div id="base" class="">

    <!-- Unnamed (Group) -->
    <div id="u2781" class="ax_default" data-left="0" data-top="70" data-width="1100" data-height="1753">

        <!-- Unnamed (Rectangle) -->
        <div id="u2782" class="ax_default _默认样式">
            <div id="u2782_div" class=""></div>
        </div>
    </div>

    <!-- Unnamed (Group) -->
    <div id="u2783" class="ax_default" data-left="0" data-top="70" data-width="300" data-height="1753">

        <!-- Unnamed (Rectangle) -->
        <div id="u2784" class="ax_default _默认样式">
            <div id="u2784_div" class=""></div>
        </div>
    </div>

    <!-- Unnamed (标题通栏) -->

    <!-- 灰色背景 (Dynamic Panel) -->
    <div id="u2786" class="ax_default" data-label="灰色背景">
        <div id="u2786_state0" class="panel_state" data-label="State1" style="">
            <div id="u2786_state0_content" class="panel_state_content">
            </div>
        </div>
    </div>

    <!-- 线条 (Dynamic Panel) -->
    <div id="u2787" class="ax_default" data-label="线条">
        <div id="u2787_state0" class="panel_state" data-label="State1" style="">
            <div id="u2787_state0_content" class="panel_state_content">
            </div>
        </div>
    </div>

    <!-- 页面标题 (Rectangle) -->
    <div id="u2788" class="ax_default _默认样式" data-label="页面标题">
        <div id="u2788_text" class="text ">
            <p><span>评价详情</span></p>
        </div>
    </div>

    <!-- Unnamed (bottom) -->

    <!-- Unnamed (Rectangle) -->
    <!--    <div id="u2790" class="ax_default _默认样式">-->
    <!--        <img id="u2790_img" class="img "src="/images/loginjiemian/u1256.png"/>-->
    <!--        <div id="u2790_text" class="text ">-->
    <!--            <p><span></span></p><p><span><br></span></p>-->
    <!--        </div>-->
    <!--    </div>-->


    <!--评论内容-->


    <!-- Unnamed (Rectangle) -->
    <div id="u2791" class="ax_default _默认样式">
        <div id="u2791_div" class=""></div>
        <div id="u2791_text" class="text ">
            <div id="app">
                <p><span>{{commentData.replyContent}}</span></p>
            </div>

        </div>
    </div>

    <!-- Unnamed (Group) -->
    <div id="app10">
        <div id="u2792" class="ax_default" data-left="351" data-top="598" data-width="677" data-height="70">

            <!-- Unnamed (Rectangle) -->
            <div id="u2793" class="ax_default _默认样式" v-show="shows[0]==1">
                <!--                <div id="u2793_div" class=""></div>-->
                <!--                <div id="u2793_text" class="text ">-->
                <img id="u2793_div" class="img " :src="replyImages[0]"/>
                <!--                </div>-->
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2794" class="ax_default _默认样式" v-show="shows[1]==1">
                <!--                <div id="u2794_div" class=""></div>-->
                <!--                <div id="u2794_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2794_div" class="img " :src="replyImages[1]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2795" class="ax_default _默认样式"v-show="shows[2]==1">
                <!--                <div id="u2795_div" class=""></div>-->
                <!--                <div id="u2795_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2795_div" class="img " :src="replyImages[2]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2796" class="ax_default _默认样式"v-show="shows[3]==1">
                <!--                <div id="u2796_div" class=""></div>-->
                <!--                <div id="u2796_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2796_div" class="img " :src="replyImages[3]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2797" class="ax_default _默认样式"v-show="shows[4]==1">
                <!--                <div id="u2797_div" class=""></div>-->
                <!--                <div id="u2797_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2797_div" class="img " :src="replyImages[4]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2798" class="ax_default _默认样式"v-show="shows[5]==1">
                <!--                <div id="u2798_div" class=""></div>-->
                <!--                <div id="u2798_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2798_div" class="img " :src="replyImages[5]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2799" class="ax_default _默认样式"v-show="shows[6]==1">
                <!--                <div id="u2799_div" class=""></div>-->
                <!--                <div id="u2799_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2799_div" class="img " :src="replyImages[6]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2800" class="ax_default _默认样式"v-show="shows[7]==1">
                <!--                <div id="u2800_div" class=""></div>-->
                <!--                <div id="u2800_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2800_div" class="img " :src="replyImages[7]"/>
            </div>

            <!-- Unnamed (Rectangle) -->
            <div id="u2801" class="ax_default _默认样式"v-show="shows[8]==1">
                <!--                <div id="u2801_div" class=""></div>-->
                <!--                <div id="u2801_text" class="text ">-->
                <!--                    <p><span></span></p>-->
                <!--                </div>-->
                <img id="u2801_div" class="img " :src="replyImages[8]"/>
            </div>
        </div>
    </div>





    <!--    下面的评价不会调成星星-->

    <!--左边商品信息-->
    <!-- Unnamed (Rectangle) -->
    <div id="u2802" class="ax_default _默认样式">
        <div id="u2802_div" class=""></div>
        <div id="u2802_text" class="text ">
            <div id="app2">
                <p><span>商品：</span><span >{{commentData.spuName}}</span></p>
                <p><span>购买：</span><span >{{commentData.skuName}}</span></p>
                <p><span>评价：</span><span >{{commentData.productScore}}</span><span>分</span></p>
                <p><span>日期：</span><span>{{commentData.createTime}}</span></p>
            </div>
        </div>
    </div>

    <!-- Unnamed (Shape) -->
    <!--    评论者头像-->
    <div id="app1">
        <div id="u2803" class="ax_default _默认样式">
            <img id="u2803_img" class="img " :src="headPicSrc"/>
            <!--            <el-image id="u2803_img"style="background: #15d6ba" :src="commentData.userHeadPic" ></el-image>-->
        </div>

        <!-- Unnamed (Rectangle) -->
        <div id="u2804" class="ax_default _默认样式">
            <div id="u2804_div" class=""></div>
            <div id="u2804_text" class="text ">
                <!--            <div id="app1">-->
                <p><span>{{commentData.userName}}</span></p>
                <!--            </div>-->
            </div>
        </div>
    </div>



    <!-- Unnamed (关闭) -->

    <!-- Unnamed (Rectangle) -->
    <div id="u2806" class="ax_default _默认样式"  >
        <div id="app4">
            <el-button @click="goitem()" size="mini" type="primary" size="small">返回</el-button>
        </div>
    </div>

    <!-- Unnamed (Group) -->
    <div id="u2807" class="ax_default" data-left="15" data-top="8" data-width="14" data-height="14">

        <!--         Unnamed (Shape) -->
    </div>

    <!-- Unnamed (刷新) -->

    <!-- Unnamed (Rectangle) -->
    <div id="u2811" class="ax_default _默认样式" title="刷新">
        <div id="app5">
            <el-button @click="creat()" size="mini" type="primary" size="small">刷新</el-button>
        </div>
    </div>

    <!-- Unnamed (Group) -->
    <div id="u2812" class="ax_default" data-left="11" data-top="6" data-width="19" data-height="17">

        <!-- Unnamed (Shape) -->

    </div>



    <!--          收藏，阅读-->
    <!-- Unnamed (Rectangle) -->
    <div id="u2815" class="ax_default _默认样式">
        <div id="u2815_div" class=""></div>
        <div id="u2815_text" class="text ">
            <div id="app6">
                <p><span style="font-family:'FontAwesome';font-weight:400;"></span><span style="font-family:'微软雅黑';font-weight:400;">&nbsp; 收藏 <i> {{commentData.likes}} </i>&nbsp; &nbsp; </span><span style="font-family:'FontAwesome';font-weight:400;"></span><span style="font-family:'微软雅黑';font-weight:400;"> 阅读 <i>{{commentData.browses}}</i></span></p>
            </div>
        </div>
    </div>

    <!-- Unnamed (Rectangle) -->
    <!--    <div id="u2816" class="ax_default _默认样式">-->
    <!--        <div id="u2816_div" class=""></div>-->
    <!--        <div id="u2816_text" class="text ">-->
    <!--            <p><span style="font-family:'FontAwesome';font-weight:400;"></span><span style="font-family:'微软雅黑';font-weight:400;"> 回复评价</span></p>-->
    <!--        </div>-->
    <!--    </div>-->

    <!-- Unnamed (Rectangle) -->
    <div id="u2817" class="ax_default _默认样式">
        <div id="u2817_div" class=""></div>
        <div id="u2817_text" class="text ">
            <!--            <p><span style="font-family:'FontAwesome';font-weight:400;"><br></span></p><p><span style="font-family:'FontAwesome';font-weight:400;"> </span><span style="font-family:'微软雅黑';font-weight:400;">全部评论 100</span></p><p><span style="font-family:'FontAwesome';font-weight:400;"><br></span></p>-->
        </div>
    </div>

    <!--    &lt;!&ndash; Unnamed (Rectangle) &ndash;&gt;-->
    <!--    <div id="u2818" class="ax_default _默认样式">-->
    <!--        <div id="u2818_text" class="text ">-->
    <!--            <p><span>用户名：</span></p>-->
    <!--        </div>-->
    <!--    </div>-->

    <!--    &lt;!&ndash; Unnamed (Rectangle) &ndash;&gt;-->
    <!--    <div id="u2819" class="ax_default _默认样式">-->
    <!--        <div id="u2819_text" class="text ">-->
    <!--            <p><span>Email：</span></p>-->
    <!--        </div>-->
    <!--    </div>-->

    <!-- Unnamed (Rectangle) -->
    <!--    <div id="u2820" class="ax_default _默认样式">-->
    <!--        <div id="u2820_text" class="text ">-->
    <!--            <p><span style="color:#f04844;">*</span><span> 回复内容：</span></p>-->
    <!--        </div>-->
    <!--    </div>-->

    <!-- Unnamed (Rectangle) -->
    <!--    <div id="u2821" class="ax_default _默认样式">-->
    <!--        <div id="u2821_div" class=""></div>-->
    <!--        <div id="u2821_text" class="text ">-->
    <!--            <div id="app7">-->
    <!--                <p><span>admin</span></p>-->
    <!--            </div>-->
    <!--        </div>-->
    <!--    </div>-->

    <!--    &lt;!&ndash; Unnamed (Rectangle) &ndash;&gt;-->
    <!--    <div id="u2822" class="ax_default _默认样式">-->
    <!--        <div id="u2822_div" class=""></div>-->
    <!--        <div id="u2822_text" class="text ">-->
    <!--            <p><span>88888888@qq.com</span></p>-->
    <!--        </div>-->
    <!--    </div>-->

    <!-- Unnamed (Rectangle) -->
    <!--    <div id="app8">-->
    <!--    <div id="u2823" class="ax_default _默认样式">-->
    <!--        <div  class=""></div>-->
    <!--        <div id="u2823_text" class="text ">-->
    <!--&lt;!&ndash;            <p><span>请输入内容</span></p>&ndash;&gt;-->


    <!--                <el-input  id="u2823_div" type="textarea" placeholder="请输入内容" v-model="textarea">-->
    <!--                </el-input>-->


    <!--        </div>-->
    <!--    </div>-->
    <!--    <div id="u2849" class="ax_default _默认样式">-->
    <!--&lt;!&ndash;        <div id="u2849_div" class=""></div>&ndash;&gt;-->
    <!--        <div id="u2849_text" class="text ">-->
    <!--            &lt;!&ndash;            <p><span>确定</span></p>&ndash;&gt;-->
    <!--            <el-button @click="save()" type="primary">确定</el-button>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    </div>-->


    <!-- Unnamed (Rectangle) -->
    <!--    <div id="7_9" class="ax_default _默认样式">-->
    <div id="app7">
        <div v-show="isShow==1" id="u2824" class="ax_default _默认样式" >
            <!--        <img id="u2825_img" class="img " src="/images/commentdetails/u2825.png"/>-->
            <img id="u2825_img" class="img " :src="commentData.userHeadPic"/>
            <div id="u2824_text" class="text ">
                <p style="font-size:14px;">
                    <span style="color:darkorange;">{{commentData1[0].storeName}}</span>
                </p>
                <p style="font-size:14px;">
                    <span style="color:#999999;">回复</span>
                    <span style="color:darkorange;">{{commentData.userName}}</span>
                    <span style="color:#999999;">：</span>
                    <span style="color:black;;">{{commentData1[0].storeReplyContent}}</span>
                </p>
                <p style="font-size:12px;">
                    <span style="color:#999999;">{{commentData1[0].storeReplyTime}}&nbsp;&nbsp; </span>
                    <!--                    <button @click="hide()" style="border-style: none;background-color: transparent"  >隐藏</button>-->
                    <!--                    <button @click="dele()" style="border-style: none;background-color: transparent">删除</button>-->
                </p>
            </div>
        </div>
    </div>


    <div id="app9">
        <div v-show="isShow==1" id="u28241" class="ax_default _默认样式" >
            <!--            <img id="u2825_img1" class="img " src="/images/commentdetails/u2825.png"/>-->
            <img id="u2825_img1" class="img " :src="commentData.userHeadPic"/>
            <div id="u2824_text1" class="text ">
                <!--                <p style="font-size:14px;">-->
                <!--                    <span style="color:darkorange;">{{commentData.storeName}}</span>-->
                <!--                </p>-->
                <p style="font-size:14px;">
                    <span style="color:#999999;">回复</span>
                    <span style="color:darkorange;">{{commentData.userName}}</span>
                    <span style="color:#999999;">：</span>
                    <span style="color:black;;">{{commentData.followContent}}</span>
                </p>
                <p style="font-size:12px;">
                    <span style="color:#999999;">{{commentData.updateTime}}&nbsp;&nbsp; </span>
                    <!--                    <button @click="hide()" style="border-style: none;background-color: transparent"  >隐藏</button>-->
                    <button @click="dele()" style="border-style: none;background-color: transparent">删除</button>
                </p>
            </div>
        </div>
    </div>
    <!--        </div>-->

    <!-- Unnamed (Shape) -->
    <div id="u2825" class="ax_default _默认样式" display="none">
        <!--        <img id="u2825_img" class="img " src="/images/commentdetails/u2825.png"/>-->
    </div>



    <!--       Unnamed (Rectangle) -->
    <!--    <div id="u2850" class="ax_default _默认样式">-->
    <!--        <div id="u2850_div" class=""></div>-->
    <!--        <div id="u2850_text" class="text ">-->
    <!--            <p><span>注意：管理员回复内容会在前台显示</span></p>-->
    <!--        </div>-->
    <!--    </div>-->
</div>
</div>
</body>
</html>

<script src="/js/vue.js"></script>
<script src="/js/axios.js"></script>
<script src="/js/elementui.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="/js/util.js"></script>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
                productName:'',
                userName:'',
                id:'1434806995839471937',
                commentData: {},
                currentPage: 1,
                size: 10,
                total:10,
                centerDialogVisible: false,
                pojo: {},
                imageUrl: '',
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData1(){
                axios.get(`/productReply/findPage.do?page=${this.currentPage}&size=${this.size}`).then(response => {
                    this.tableData = response.data.rows;
                    console.log(response.data);
                    this.total = response.data.total;
                })
            },
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log(response.data);
                    console.log("asd");

                });
            },
            save() {
                this.pojo.image = this.imageUrl;
                let _this = this;
                axios.get(`/productReply/${this.pojo.id == null ? 'add' : 'update'}.do`, this.pojo).then(response => {
                    this.centerDialogVisible = false;
                    this.handleCurrentChange();
                })
            },
            edit(id) {
                this.centerDialogVisible = true;
                let _this = this;
                axios.post(`/productReply/findSkuListBySkuIds.do?id=${id}`).then(response => {
                    console.log(response.data);
                    _this.pojo = response.data;
                    _this.imageUrl = _this.pojo.imag;
                })
            },
            goCommentList(){
                location.href="commentList.html"
            },
            dele(id) {
                //console.log("id");
                this.$confirm('要删除吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    axios.get(`/productReply/delete.do?id=${id}`).then(response => {
                        if (response.data.code == 0) {
                            this.handleCurrentChange();
                            this.$message({
                                type: 'success',
                                message: '删除成功!'
                            });
                        } else {
                            this.$message({
                                type: 'error',
                                message: '删除失败!'
                            });
                        }
                    })
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    });
                });
            },
            deleMany(){
                axios.post(`/productReply/deleMany.do`,this.ids).then(response => {
                    console.log(response.data);
                });
            },
            handleAvatarSuccess(response, file) {
                this.imageUrl = file.response;
            }
        }
    })
    new Vue({
        el:"#app1",
        data(){
            return {
                // commentData: {},
                id:'1434806995839471937',
                headPicSrc:"",
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    this.headPicSrc=this.commentData.userHeadPic;
                    console.log("this.headPicSrc");
                    console.log(this.headPicSrc);
                });
            },
        }
    })
    new Vue({
        el:"#app2",
        data(){
            return {
                commentData: {},
                id:'1434806995839471937',
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log(response.data);
                });
            },

        }
    })
    // new Vue({
    //     el:"#app3",
    //     data(){
    //         return {
    //             commentData: {},
    //             id:'',
    //         }
    //     },
    //     created() {
    //         this.id=getQueryString("commentId");
    //         this.fetchData2();
    //     },
    //     methods: {
    //         fetchData2() {
    //             axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
    //                 this.commentData = response.data;
    //                 console.log(response.data);
    //             });
    //         },
    //     }
    // })
    new Vue({
        el: "#app4",
        data() {
            return {
                id:'',
                commentData: {},
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log(response.data);
                    console.log("asd");

                });
            },
            goitem(){
                location.href="http://localhost:9102/item/createPage.do?id=100000003145"
            },
        }
    })
    new Vue({
        el:"#app5",
        data(){
            return {
                commentData: {},
                id:'',
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log(response.data);
                });
            },
        }
    })
    new Vue({
        el:"#app6",
        data(){
            return {
                commentData: {},
                id:'1434806995839471937',
            }
        },
        created() {
            this.id=getQueryString("commentId");
            this.fetchData2();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log(response.data);
                    axios.get(`/productReply/browsesAdd.do?id=${this.id}`)
                });
            },
        }
    })

    /**
     * app7的删除和隐藏还有问题
     */
    var app7=new Vue({
        el: "#app7",
        data() {
            return {
                commentData: {},
                commentData1: {},
                searchMap: {},
                id:'1434806995839471937',
                hfId:"",
                isShow:1,

            }
        },
        created() {
            this.id = getQueryString("commentId");
            this.searchMap = {replyId: this.id};
            this.fetchData2();
            this.fetchData3();
        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;

                    console.log("app7commentData");
                    console.log(response.data);
                });
            },
            fetchData3() {
                console.log("app7commentData1");
                axios.post(`/storeReply/findByProductReplyId.do`, this.searchMap).then(response => {
                    console.log("app7commentData2");
                    this.commentData1 = response.data;
                    console.log("commentData1");
                    console.log(this.commentData1);
                    if(this.commentData1.length==0){
                        console.log("app70");
                        console.log("0");
                        this.isShow=0;
                        var Div = document.getElementById("u28241");
                        Div.style.top = "750px";
                        console.log(this.isShow);

                    }
                    if(this.commentData1.length!=0){
                        this.hfId=this.commentData1[0].id;
                        this.isShow=1;

                    }
                });
            },
            hide() {

            },
            dele() {
                //console.log("id");
                this.$confirm('要删除吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    console.log("回复id")
                    console.log(this.hfId)
                    axios.get(`/storeReply/delete.do?id=${this.hfId}`).then(response => {
                        if (response.data.code == 0) {
                            this.$message({
                                type: 'success',
                                message: '成功删除!'
                            });
                            this.fetchData2();
                            setTimeout(() =>{
                                this.fetchData3();
                            },1000);
                            location.href="commentDetails.html?commentId="+this.id;


                        } else {
                            this.$message({
                                type: 'error',
                                message: '删除失败!'
                            });
                        }

                    });
                });
            },
        }
    })
    //输入框
    // new Vue({
    //     el: "#app8",
    //     data() {
    //         return {
    //             textarea:"",
    //             searchMap:{},
    //             id:""
    //
    //         }
    //     },
    //     created() {
    //         this.id = getQueryString("commentId");
    //         this.searchMap = {replyId: this.id};
    //
    //     },
    //     methods: {
    //         save(){
    //             console.log("response")
    //             axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
    //
    //                 console.log("commentData");
    //                 console.log(response.data);
    //                 if(response.data.isReply=="1"){
    //                     this.$message({
    //                         type: 'error',
    //                         message: '已经评论过了!'
    //                     });
    //                 }
    //                 else{
    //                     axios.post(`/storeReply/add.do`,{"replyId":this.id,"storeReplyContent":this.textarea}).then(response => {
    //                         if (response.data.code == 0) {
    //                             this.textarea="";
    //                             this.$message({
    //                                 type: 'success',
    //                                 message: '评论成功!'
    //                             });
    //                             app7.fetchData2();
    //                             app7.fetchData3();
    //
    //                         } else {
    //                             this.$message({
    //                                 type: 'error',
    //                                 message: '评论失败!'
    //                             });
    //                         }
    //                     });
    //                 }
    //             });
    //
    //
    //         }
    //
    //
    //
    //     }
    // })
    //追评显示
    var app9=new Vue({
        el: "#app9",
        data() {
            return {
                //textarea:"",
                commentData:{},
                searchMap:{},
                id:'1434806995839471937',
                isShow:1,

            }
        },
        created() {
            this.id = getQueryString("commentId");
            this.searchMap = {replyId: this.id};
            this.fetchData2()

            //this.pos();




        },
        methods: {
            pos(){
                console.log("pos")
                console.log(app7.isShow)
                if(app7.isShow==0){
                    var Div = document.getElementById("u28241");
                    Div.style.top = "750px";
                }
            },
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log("commentData");
                    if(this.commentData.followContent==null){
                        this.isShow=0;
                    }
                    console.log(response.data);
                });
            },
            dele() {
                //console.log("id");
                this.$confirm('要删除吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    console.log("回复id")
                    console.log(this.hfId)
                    axios.get(`/productReply/deleteFollow.do?id=${this.id}`).then(response => {
                        if (response.data.code == 0) {
                            this.$message({
                                type: 'success',
                                message: '成功删除!'
                            });
                            this.fetchData2();
                            location.href="commentDetails.html?commentId="+this.id;
                        } else {
                            this.$message({
                                type: 'error',
                                message: '删除失败!'
                            });
                        }

                    });
                });
            },



        }
    })
    //评论图片显示
    new Vue({
        el: "#app10",
        data() {
            return {
                //textarea:"",
                commentData:{},
                searchMap:{},
                id:'1434806995839471937',
                isShow:1,
                replyImages:[],
                shows:[1,1,1,1,1,1,1,1,1]

            }
        },
        created() {
            this.id = getQueryString("commentId");
            this.searchMap = {replyId: this.id};
            this.fetchData2()

        },
        methods: {
            fetchData2() {
                axios.get(`/productReply/findById.do?id=${this.id}`).then(response => {
                    this.commentData = response.data;
                    console.log("commentData");
                    if(this.commentData.followContent==null){
                        this.isShow=0;
                    }

                    console.log("this.replyImages")
                    console.log(this.commentData.replyImage)
                    if(this.commentData.replyImage==null){
                        this.shows=[0,0,0,0,0,0,0,0,0]
                    }
                    else {
                        var strs = new Array(); //定义一数组
                        strs = this.commentData.replyImage.split(","); //字符分割
                        this.replyImages = strs;
                        console.log("this.replyImages")
                        console.log(this.replyImages)
                        for (var i = this.replyImages.length; i < 9; i++) {
                            this.shows[i] = 0;
                        }
                    }
                    console.log("评论图片");
                    console.log(strs);
                    console.log(response.data);
                });
            },
        }
    })
</script>